package com.xxd.spring.boot.demo.zhuhongbing.util;

public class Result {
    private String message;
    private String code;
    private Object data;

    public void setMessage(String message) {
        this.message = message;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }

    public Object getData() {
        return data;
    }

    public com.xxd.spring.boot.demo.zhuhongbing.util.Result success(){
        this.message="成功";
        this.code="200";
        return this;
    }

    public com.xxd.spring.boot.demo.zhuhongbing.util.Result error(){
        this.message="服务器异常";
        this.code="500";
        return this;
    }

    public com.xxd.spring.boot.demo.zhuhongbing.util.Result setData(Object data){
        this.data = data;
        return this;
    }
}
